/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.fii.entity;

import java.io.Serializable;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Zeus
 */
@Entity
@Table(name = "pg_equivalencias", catalog = "prog_acad", schema = "")
@NamedQueries({
    @NamedQuery(name = "PgEquivalencias.findAll", query = "SELECT p FROM PgEquivalencias p"),
    @NamedQuery(name = "PgEquivalencias.findByPgcodPlan", query = "SELECT p FROM PgEquivalencias p WHERE p.pgEquivalenciasPK.pgcodPlan = :pgcodPlan"),
    @NamedQuery(name = "PgEquivalencias.findByPgcodCurso", query = "SELECT p FROM PgEquivalencias p WHERE p.pgEquivalenciasPK.pgcodCurso = :pgcodCurso"),
    @NamedQuery(name = "PgEquivalencias.findByPgcodCursoEquiv", query = "SELECT p FROM PgEquivalencias p WHERE p.pgEquivalenciasPK.pgcodCursoEquiv = :pgcodCursoEquiv")})
public class PgEquivalencias implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected PgEquivalenciasPK pgEquivalenciasPK;

    public PgEquivalencias() {
    }

    public PgEquivalencias(PgEquivalenciasPK pgEquivalenciasPK) {
        this.pgEquivalenciasPK = pgEquivalenciasPK;
    }

    public PgEquivalencias(String pgcodPlan, String pgcodCurso, String pgcodCursoEquiv) {
        this.pgEquivalenciasPK = new PgEquivalenciasPK(pgcodPlan, pgcodCurso, pgcodCursoEquiv);
    }

    public PgEquivalenciasPK getPgEquivalenciasPK() {
        return pgEquivalenciasPK;
    }

    public void setPgEquivalenciasPK(PgEquivalenciasPK pgEquivalenciasPK) {
        this.pgEquivalenciasPK = pgEquivalenciasPK;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (pgEquivalenciasPK != null ? pgEquivalenciasPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PgEquivalencias)) {
            return false;
        }
        PgEquivalencias other = (PgEquivalencias) object;
        if ((this.pgEquivalenciasPK == null && other.pgEquivalenciasPK != null) || (this.pgEquivalenciasPK != null && !this.pgEquivalenciasPK.equals(other.pgEquivalenciasPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.fii.entity.PgEquivalencias[ pgEquivalenciasPK=" + pgEquivalenciasPK + " ]";
    }
    
}
